package com.zhao.service.Impl;

import com.zhao.dao.PurchaseMapper;
import com.zhao.pojo.Purchase;
import com.zhao.service.PurchaseService;
import com.zhao.vo.PurchaseVoOne;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PurchaseServiceImpl implements PurchaseService {
    @Autowired
    PurchaseMapper mapper;
    @Override
    public List<Purchase> selectAllPurchase() {
        return mapper.selectAllPurchase();
    }

    @Override
    public int addPurchase(PurchaseVoOne purchaseVoOne) {
        return mapper.addPurchase(purchaseVoOne);
    }

    @Override
    public Purchase selectPurchaseById(int id) {
        return mapper.selectPurchaseById(id);
    }

    @Override
    public int updatePurchase(PurchaseVoOne purchaseVoOne) {
        return mapper.updatePurchase(purchaseVoOne);
    }

    @Override
    public int deletePurchase(int id) {
        return mapper.deletePurchase(id);
    }
}
